import { create } from 'zustand'

import { APP_STATUS, RECORDER_STATUS, INSPECTOR_STATUS, PLAYER_STATUS, PLAYER_MODE, } from '@/common/constant';
import { ipc } from '@/ipc'
type TestSuiteCase = {
    testCaseId: string;
    loops: string | number;
}

type TestSuiteStatus = {
    doneIndices?: number[];
    errorIndices?: number[];
    currentIndex?: number;
    isPlaying?: boolean;
}

type TestSuite = {
    name: string;
    id?: string;
    fold?: boolean;
    cases: TestSuiteCase[];
    playStatus: TestSuiteStatus;
}

type Command = {
    cmd: string;
    target: string;
    value: string;
    extra?: any;
    targetOptions?: string[];
}

enum MacroResultStatus {
    Normal = 'NORMAL',
    Success = 'SUCCESS',
    Error = 'ERROR',
    ErrorInSub = 'ERROR_IN_SUB'
}

type MacroExtraData = {
    status: MacroResultStatus;
    breakpointIndices: number[];
    doneCommandIndices: number[];
    errorCommandIndices: number[];
    warningCommandIndices?: number[];
    folded: boolean;
}

type Entry = {
    dir: string;
    name: string;
    relativePath: string;
    fullPath: string;
    size: number;
    isFile: boolean;
    isDirectory: boolean;
    lastModified: Date;
}

type Tree<T> = T & {
    children: Tree<T>[];
}

type EntryNode = Tree<Entry>

enum ProxyScheme {
    Http = 'http',
    Https = 'https',
    Socks4 = 'socks4',
    Socks5 = 'socks5'
}

type ProxyData = {
    type: ProxyScheme;
    host: string;
    port: string;
    username?: string;
    password?: string;
}

type MacroCommand = {
    cmd: string;
    target?: string;
    value?: string;
    targetOptions?: string[];
}

type Macro = {
    name: string;
    commands: MacroCommand[];
    status?: string;
    id?: string;
}

export type MacroInState = {
    id: string;
    name: string;
    path: string;
    data: {
        commands: Command[];
    };
}

export type FolderExtraData = {
    folded: boolean;
}

type ID = string;

type Resource = {
    url: string;
    name: string;
    createTime: Date;
}

type Editing = {
    commands: Command[];
    meta: {
        src: null | {
            id: ID;
            name: string;
        };
        hasUnsaved: boolean;
        selectedIndex: number;
        indexToInsertRecorded?: number;
    };
}

export enum RunBy {
    Html = 'html',
    Bookmark = 'bookmark',
    Manual = 'manual'
}

export function stringForRunBy(type: RunBy): string {
    switch (type) {
        case RunBy.Bookmark:
            return 'bookmark'

        case RunBy.Html:
            return 'command line'

        case RunBy.Manual:
            return 'manual'
    }
}

export type LogType = 'status' | 'reflect' | 'echo' | 'info' | 'warning' | 'error' | 'report'

export type LogSource = {
    macroId: string;
    macroName: string;
    commandIndex: number;
    isSubroutine?: boolean;
}

export type LogItem = {
    type: LogType;
    text: string;
    id: string;
    stack: LogSource[];
    createTime: Date;
    options: Record<string, any>;
}

export type UIConfig = {
    newPreinstallVersion?: boolean;
    showSettings?: boolean;
    settingsTab?: string;
    sidebarTab?: 'Macro';
    showWebsiteWhiteList?: boolean;
    showXFileNotInstalledDialog?: boolean;
    focusArea?: FocusArea;
    isSaving?: boolean;
}

export enum FocusArea {
    Unknown = 'unknown',
    Sidebar = 'sidebar',
    CommandTable = 'command_table',
    CodeSource = 'code_source'
}

export const newTestCaseEditing: Editing = {
    commands: [],
    meta: {
        src: null,
        hasUnsaved: true,
        selectedIndex: -1
    }
}

type AppStatus = typeof APP_STATUS[keyof typeof APP_STATUS]

// 定义 store 的类型
type State = {
    count: number; // test property
    config: Record<string, any>;
    status: AppStatus;
    recorderStatus: string;
    inspectorStatus: string;

    isLoadingMacros: boolean;
    from: RunBy;
    noDisplayInPlay: boolean;
    ocrInDesktopMode: boolean;
    replaySpeedOverrideToFastMode: boolean;

    editor: {
        testSuites: TestSuite[];
        testCases: MacroInState[];
        macrosExtra: Record<ID, FolderExtraData | MacroExtraData>;
        macroFolderStructure: EntryNode[];
        testSuitesExtra: Record<ID, any>;

        currentMacro: Macro | null;
        editing: Editing;
        editingSource: {
            original: string | null;
            pure: string | null;
            current: string | null;
            error: string | null;
        };
        clipboard: {
            commands: Command[];
        };
        activeTab: 'table_view' | 'source_view';
        isDraggingCommand: boolean;
    };

    player: {
        mode: string;
        status: string;
        stopReason: string | null;
        currentLoop: number;
        loops: number;
        nextCommandIndex: number | null;
        playInterval: number;
        timeoutStatus: {
            type: string | null;
            total: number | null;
            past: number | null;
        };
    };

    recorder: {
        skipOpen: boolean;
    };

    variables: Array<{ key: string; value: any; }>;
    logs: LogItem[];
    csvs: Array<Resource & { size: number }>;
    visions: Resource[];
    screenshots: Resource[];
    proxy: ProxyData | null;
    ui: UIConfig;
    macroQuery: string;

}


type Action = {
    startRecording: () => void;
    stopRecording: () => void;
    startPlaying: (isStep?: boolean) => void;
    stopPlaying: () => void;
    setEditorActiveTab: (tab: 'table_view' | 'source_view') => void;
    appendCommand: (command: Command) => void;
    removeCommand: (index: number) => void;
    updateCommand: (index: number, command: Command) => void;
    insertCommand: () => void;
    deplicateCommand: (index: number) => void;
    updateSelectedCommand: () => void;
    saveEditingAsExisted: () => void;
    saveEditingAsNew: () => void;
    setTestCases: () => void;
    setTestSuites: () => void;
    updateTestSuites: () => void;
    updateTestSuiteStatus: () => void;
    setEditing: () => void;
    editTestCase: () => void;
    setOneMacroExtra: () => void;
    updateOneMacroExtra: () => void;

}

// 初始化 store 的值
const initialState: State = {
    count: 0, // test value
    status: APP_STATUS.NORMAL, // 应用状态
    recorderStatus: RECORDER_STATUS.STOPPED, // 录制器状态
    inspectorStatus: INSPECTOR_STATUS.STOPPED, // 检查器状态
    isLoadingMacros: false,
    from: RunBy.Manual,
    noDisplayInPlay: false,
    ocrInDesktopMode: false,
    replaySpeedOverrideToFastMode: false,
    editor: {
        testSuites: [], // 过时，不再使用
        testCases: [],// 过时，不再使用
        currentMacro: null, // 当前选择的实例，当编辑时修改editing，保存时更新currentMacro
        // macrosExtra is used to store:
        // * status
        // * breakpoints
        // * doneCommandIndices
        // * errorCommandIndices
        // * warningCommandIndices
        macrosExtra: {},
        // `macroFolderStructure` just holds folder and path info,
        // while macro content is still in `testCases`.

        macroFolderStructure: [], // 目录结构
        testSuitesExtra: {},

        editing: {
            ...newTestCaseEditing
        }, // 编辑时实时更新，当点保存时更新currentMacro，与currentMacro比较可判断出是否编辑了
        editingSource: {
            // Saved version 已保存
            original: null,
            // Version before editing 编辑前
            pure: null,
            // Version keeping track of any editing 编辑后
            current: null,
            error: null
        },
        clipboard: {
            commands: []
        },
        activeTab: 'table_view', // 视图
        isDraggingCommand: false // 是否在拖拽命令
    },
    player: {
        mode: PLAYER_MODE.TEST_CASE, // 播放器模式
        status: PLAYER_STATUS.STOPPED, // 播放器状态
        stopReason: null,
        currentLoop: 0,
        loops: 0,
        nextCommandIndex: null,
        playInterval: 0,
        timeoutStatus: {
            type: null,
            total: null,
            past: null
        }
    },
    recorder: {
        skipOpen: false
    },
    variables: [],
    logs: [],
    screenshots: [],
    csvs: [],
    visions: [],
    config: {},
    proxy: null,
    ui: {
        focusArea: FocusArea.Unknown
    },
    macroQuery: '',

}


const state = {
    "count": 0,
    "status": "NORMAL", // 整体状态 录制、捕获、回放
    "recorderStatus": "STOPPED", // 录制状态 
    "inspectorStatus": "STOPPED", // 捕获状态
    "isLoadingMacros": false, // 是否正在加载用例
    "from": "manual", // 
    "noDisplayInPlay": false, // 回放时不展示
    "ocrInDesktopMode": false, // 在桌面模式下使用OCR
    "replaySpeedOverrideToFastMode": false, // 回放速度覆盖快速模式
    "editor": {
        "testSuites": [],
        "testCases": [],
        "currentMacro": {
            "id": "/macros/示例/网页自动化/使用IfElse.json",
            "data": {
                "commands": [
                    {
                        "cmd": "store",
                        "target": "fast",
                        "value": "!replayspeed",
                        "description": ""
                    },
                    {
                        "cmd": "open",
                        "target": "https://ui.vision/demo/executeScript",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "executeScript",
                        "target": "return (new Date().getHours())",
                        "value": "mytime",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "mytime = ${mytime}",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "if",
                        "target": "${mytime}  > 16",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "else",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "end",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "storeAttribute",
                        "target": "//input[@id='sometext-WRONG-ID-TEST']@size",
                        "value": "boxsize",
                        "description": ""
                    },
                    {
                        "cmd": "if",
                        "target": "${boxsize} == \"#LNF\"",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).",
                        "value": "blue",
                        "description": ""
                    },
                    {
                        "cmd": "storeAttribute",
                        "target": "//input[@id='sometext']@size",
                        "value": "boxsize",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "With correct Xpath ID we get: Boxsize = ${boxsize}",
                        "value": "green",
                        "description": ""
                    },
                    {
                        "cmd": "end",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "gotoIf",
                        "target": "${boxsize} > 70",
                        "value": "BOX-TOO-BIG",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometext",
                        "value": "This box is ${boxsize} chars wide",
                        "description": ""
                    },
                    {
                        "cmd": "executeScript",
                        "target": "document.title = ${boxsize};",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "gotoLabel",
                        "target": "END",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "BOX-TOO-BIG",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "Input box too big. This is just a test of gotoIf",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "executeScript",
                        "target": "document.title = \"Just a gotoIf test. This line should not be reached unless you edit the macro\"",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "END",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "test case completed",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "comment",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "onError",
                        "target": "#goto",
                        "value": "fixerror",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometext",
                        "value": "this line works",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometextXXXXX",
                        "value": "this line has the wrong ID...",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "this line is never reached, because of the error above",
                        "value": "blue",
                        "description": ""
                    },
                    {
                        "cmd": "gotoLabel",
                        "target": "end-part2",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "fixerror",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "here we can have code that handles the error..",
                        "value": "green",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometext",
                        "value": "Fix Error Section: This command works.",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "end-part2",
                        "value": "",
                        "description": ""
                    }
                ]
            },
            "name": "使用IfElse",
            "path": "示例/网页自动化/使用IfElse.json"
        }, // 当前选择的用例，与编辑中的数据做比较可以判断是否未保存
        "macrosExtra": {
            "/macros/Demo": {
                "folded": false
            },
            "/macros/Demo/AI(Beta)": {
                "folded": true
            },
            "/macros/Demo/AI(Beta)/CU_FillForm.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [3],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/AI(Beta)/CU_PlayTicTacToe.json": {},
            "/macros/Demo/AI(Beta)/CU_PressClear_Desktop.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    1
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/AI(Beta)/ScreenXY_SearchForum.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core": {
                "folded": false
            },
            "/macros/Demo/Core/DemoAutofill.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [3],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoCsvReadArray.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoCsvReadWithWhile.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [12]
            },
            "/macros/Demo/Core/DemoCsvSave.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoDownload.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [7],
                "status": null,
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoDragDrop.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoExecuteScript.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoExtract.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoFrames.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [0],
                "errorCommandIndices": [26],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoIfElse.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [10, 28]
            },
            "/macros/Demo/Core/DemoIframe.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [5],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoImplicitWaiting.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoTabs.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoTakeScreenshots.json": {
                "doneCommandIndices": [0],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/Sub": {
                "folded": true
            },
            "/macros/Demo/Core/Sub/Sub_DemoCsvRead_FillForm.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/使用IfElse.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [
                    10,
                    28
                ]
            },
            "/macros/Demo/Core/保存为Csv.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/隐性等待.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules": {
                "folded": true
            },
            "/macros/Demo/XModules/DemoPDFTest_with_OCR.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    29
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoVisualUITest.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [
                    3,
                    6
                ]
            },
            "/macros/Demo/XModules/DemoXClick.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXClickTextRelative.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    21
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXMove.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXRun.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXType.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/PDF使用OCR检查.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    29
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/XClick 点击画图.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/XMove 拖动.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/XRun运行其他程序.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop": {
                "folded": false
            },
            "/macros/Demo/XModules_Desktop/DemoAutomateChromeDevTools.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/DemoXDesktopAutomation.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/Sub": {
                "folded": false
            },
            "/macros/Demo/XModules_Desktop/Sub/Sub_XDesktopAutomation_Area.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/桌面自动化.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/自动化打开ChromeDevTools.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_桌面自动化": {
                "folded": true
            },
            "/macros/Demo/XModules_桌面自动化/Sub": {
                "folded": true
            },
            "/macros/Demo/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_桌面自动化/桌面自动化.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_网页自动化": {
                "folded": true
            },
            "/macros/Demo/XModules网页自动化": {
                "folded": true
            },
            "/macros/Demo/网页自动化": {
                "folded": true
            },
            "/macros/Demo/网页自动化/Sub": {
                "folded": true
            },
            "/macros/Demo/网页自动化/多Frame嵌套.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    0
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Embedded_verifyElementPresent.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/测试": {
                "folded": true
            },
            "/macros/测试/录制.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6
                ],
                "errorCommandIndices": [
                    7
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/测试/测试录制.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/示例": {
                "folded": false
            },
            "/macros/示例/AI(Beta)": {
                "folded": true
            },
            "/macros/示例/XModules_桌面自动化": {
                "folded": true
            },
            "/macros/示例/XModules_桌面自动化/Sub": {
                "folded": false
            },
            "/macros/示例/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json": {
                "doneCommandIndices": [
                    0,
                    1,
                    2,
                    3,
                    4
                ],
                "errorCommandIndices": [
                    5
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/示例/XModules_桌面自动化/桌面自动化.json": {
                "doneCommandIndices": [
                    0,
                    1,
                    2
                ],
                "errorCommandIndices": [],
                "status": "ERROR_IN_SUB",
                "warningCommandIndices": []
            },
            "/macros/示例/XModules_桌面自动化/自动化打开ChromeDevTools.json": {
                "doneCommandIndices": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    8,
                    9,
                    10,
                    11,
                    12,
                    13,
                    16,
                    17,
                    20,
                    21,
                    22,
                    23,
                    24,
                    25,
                    26,
                    27,
                    28
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/示例/XModules_网页自动化": {
                "folded": true
            },
            "/macros/示例/XModules_网页自动化/XClick 点击画图.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/示例/网页自动化": {
                "folded": false
            },
            "/macros/示例/网页自动化/Sub": {
                "folded": false
            },
            "/macros/示例/网页自动化/使用IfElse.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    3
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/示例/网页自动化/多Frame嵌套.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    0
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            }
        }, // 用例的额外数据
        "macroFolderStructure": [
            {
                "dir": "/macros",
                "name": "测试",
                "fullPath": "/macros/测试",
                "relativePath": "测试",
                "isFile": false,
                "isDirectory": true,
                "size": 0,
                "lastModified": "1970-01-01T00:00:00.000Z",
                "children": [
                    {
                        "dir": "/macros/测试",
                        "name": "录制",
                        "fullPath": "/macros/测试/录制.json",
                        "relativePath": "测试/录制.json",
                        "isFile": true,
                        "isDirectory": false,
                        "size": 1982,
                        "lastModified": "2024-12-25T03:02:21.322Z",
                        "children": []
                    },
                    {
                        "dir": "/macros/测试",
                        "name": "测试录制",
                        "fullPath": "/macros/测试/测试录制.json",
                        "relativePath": "测试/测试录制.json",
                        "isFile": true,
                        "isDirectory": false,
                        "size": 3976,
                        "lastModified": "2024-12-25T07:02:10.915Z",
                        "children": []
                    }
                ]
            },
            {
                "dir": "/macros",
                "name": "示例",
                "fullPath": "/macros/示例",
                "relativePath": "示例",
                "isFile": false,
                "isDirectory": true,
                "size": 0,
                "lastModified": "1970-01-01T00:00:00.000Z",
                "children": [
                    {
                        "dir": "/macros/示例",
                        "name": "AI(Beta)",
                        "fullPath": "/macros/示例/AI(Beta)",
                        "relativePath": "示例/AI(Beta)",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_FillForm",
                                "fullPath": "/macros/示例/AI(Beta)/CU_FillForm.json",
                                "relativePath": "示例/AI(Beta)/CU_FillForm.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2219,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_PlayTicTacToe",
                                "fullPath": "/macros/示例/AI(Beta)/CU_PlayTicTacToe.json",
                                "relativePath": "示例/AI(Beta)/CU_PlayTicTacToe.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2798,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_PressClear_Desktop",
                                "fullPath": "/macros/示例/AI(Beta)/CU_PressClear_Desktop.json",
                                "relativePath": "示例/AI(Beta)/CU_PressClear_Desktop.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1658,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_UseWebCalculator",
                                "fullPath": "/macros/示例/AI(Beta)/CU_UseWebCalculator.json",
                                "relativePath": "示例/AI(Beta)/CU_UseWebCalculator.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2050,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "Prompt_CompareImages",
                                "fullPath": "/macros/示例/AI(Beta)/Prompt_CompareImages.json",
                                "relativePath": "示例/AI(Beta)/Prompt_CompareImages.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1190,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "Prompt_ParseHTML",
                                "fullPath": "/macros/示例/AI(Beta)/Prompt_ParseHTML.json",
                                "relativePath": "示例/AI(Beta)/Prompt_ParseHTML.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2258,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "ScreenXY_PressClear_Desktop",
                                "fullPath": "/macros/示例/AI(Beta)/ScreenXY_PressClear_Desktop.json",
                                "relativePath": "示例/AI(Beta)/ScreenXY_PressClear_Desktop.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1777,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "ScreenXY_SearchForum",
                                "fullPath": "/macros/示例/AI(Beta)/ScreenXY_SearchForum.json",
                                "relativePath": "示例/AI(Beta)/ScreenXY_SearchForum.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1624,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            }
                        ]
                    },
                    {
                        "dir": "/macros/示例",
                        "name": "XModules_桌面自动化",
                        "fullPath": "/macros/示例/XModules_桌面自动化",
                        "relativePath": "示例/XModules_桌面自动化",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/XModules_桌面自动化",
                                "name": "Sub",
                                "fullPath": "/macros/示例/XModules_桌面自动化/Sub",
                                "relativePath": "示例/XModules_桌面自动化/Sub",
                                "isFile": false,
                                "isDirectory": true,
                                "size": 0,
                                "lastModified": "1970-01-01T00:00:00.000Z",
                                "children": [
                                    {
                                        "dir": "/macros/示例/XModules_桌面自动化/Sub",
                                        "name": "Sub_XDesktopAutomation_Area",
                                        "fullPath": "/macros/示例/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json",
                                        "relativePath": "示例/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json",
                                        "isFile": true,
                                        "isDirectory": false,
                                        "size": 2016,
                                        "lastModified": "2024-12-27T06:45:26.814Z",
                                        "children": []
                                    }
                                ]
                            },
                            {
                                "dir": "/macros/示例/XModules_桌面自动化",
                                "name": "桌面自动化",
                                "fullPath": "/macros/示例/XModules_桌面自动化/桌面自动化.json",
                                "relativePath": "示例/XModules_桌面自动化/桌面自动化.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2809,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_桌面自动化",
                                "name": "自动化打开ChromeDevTools",
                                "fullPath": "/macros/示例/XModules_桌面自动化/自动化打开ChromeDevTools.json",
                                "relativePath": "示例/XModules_桌面自动化/自动化打开ChromeDevTools.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 4735,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            }
                        ]
                    },
                    {
                        "dir": "/macros/示例",
                        "name": "XModules_网页自动化",
                        "fullPath": "/macros/示例/XModules_网页自动化",
                        "relativePath": "示例/XModules_网页自动化",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "PDF使用OCR检查",
                                "fullPath": "/macros/示例/XModules_网页自动化/PDF使用OCR检查.json",
                                "relativePath": "示例/XModules_网页自动化/PDF使用OCR检查.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7810,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XClick 点击画图",
                                "fullPath": "/macros/示例/XModules_网页自动化/XClick 点击画图.json",
                                "relativePath": "示例/XModules_网页自动化/XClick 点击画图.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7039,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XClick点击相关文字",
                                "fullPath": "/macros/示例/XModules_网页自动化/XClick点击相关文字.json",
                                "relativePath": "示例/XModules_网页自动化/XClick点击相关文字.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3714,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XMove 拖动",
                                "fullPath": "/macros/示例/XModules_网页自动化/XMove 拖动.json",
                                "relativePath": "示例/XModules_网页自动化/XMove 拖动.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2950,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XRun运行其他程序",
                                "fullPath": "/macros/示例/XModules_网页自动化/XRun运行其他程序.json",
                                "relativePath": "示例/XModules_网页自动化/XRun运行其他程序.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2309,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XType 键盘输入",
                                "fullPath": "/macros/示例/XModules_网页自动化/XType 键盘输入.json",
                                "relativePath": "示例/XModules_网页自动化/XType 键盘输入.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3091,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "可视化UI测试",
                                "fullPath": "/macros/示例/XModules_网页自动化/可视化UI测试.json",
                                "relativePath": "示例/XModules_网页自动化/可视化UI测试.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2796,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            }
                        ]
                    },
                    {
                        "dir": "/macros/示例",
                        "name": "网页自动化",
                        "fullPath": "/macros/示例/网页自动化",
                        "relativePath": "示例/网页自动化",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "Sub",
                                "fullPath": "/macros/示例/网页自动化/Sub",
                                "relativePath": "示例/网页自动化/Sub",
                                "isFile": false,
                                "isDirectory": true,
                                "size": 0,
                                "lastModified": "1970-01-01T00:00:00.000Z",
                                "children": [
                                    {
                                        "dir": "/macros/示例/网页自动化/Sub",
                                        "name": "Sub_DemoCsvRead_FillForm",
                                        "fullPath": "/macros/示例/网页自动化/Sub/Sub_DemoCsvRead_FillForm.json",
                                        "relativePath": "示例/网页自动化/Sub/Sub_DemoCsvRead_FillForm.json",
                                        "isFile": true,
                                        "isDirectory": false,
                                        "size": 1244,
                                        "lastModified": "2024-12-27T06:45:26.814Z",
                                        "children": []
                                    }
                                ]
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "DemoAutofill",
                                "fullPath": "/macros/示例/网页自动化/DemoAutofill.json",
                                "relativePath": "示例/网页自动化/DemoAutofill.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3293,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "DemoCsvReadArray",
                                "fullPath": "/macros/示例/网页自动化/DemoCsvReadArray.json",
                                "relativePath": "示例/网页自动化/DemoCsvReadArray.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 4261,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "DemoCsvReadWithWhile",
                                "fullPath": "/macros/示例/网页自动化/DemoCsvReadWithWhile.json",
                                "relativePath": "示例/网页自动化/DemoCsvReadWithWhile.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2122,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "Iframe",
                                "fullPath": "/macros/示例/网页自动化/Iframe.json",
                                "relativePath": "示例/网页自动化/Iframe.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1663,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "下载文件",
                                "fullPath": "/macros/示例/网页自动化/下载文件.json",
                                "relativePath": "示例/网页自动化/下载文件.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2914,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "使用IfElse",
                                "fullPath": "/macros/示例/网页自动化/使用IfElse.json",
                                "relativePath": "示例/网页自动化/使用IfElse.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 5397,
                                "lastModified": "2025-05-22T07:49:00.044Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "保存为Csv",
                                "fullPath": "/macros/示例/网页自动化/保存为Csv.json",
                                "relativePath": "示例/网页自动化/保存为Csv.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2810,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "多Frame嵌套",
                                "fullPath": "/macros/示例/网页自动化/多Frame嵌套.json",
                                "relativePath": "示例/网页自动化/多Frame嵌套.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 4740,
                                "lastModified": "2024-12-31T06:17:46.279Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "多Tabs",
                                "fullPath": "/macros/示例/网页自动化/多Tabs.json",
                                "relativePath": "示例/网页自动化/多Tabs.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3518,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "截图",
                                "fullPath": "/macros/示例/网页自动化/截图.json",
                                "relativePath": "示例/网页自动化/截图.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2525,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "执行脚本",
                                "fullPath": "/macros/示例/网页自动化/执行脚本.json",
                                "relativePath": "示例/网页自动化/执行脚本.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7858,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "拖拽元素",
                                "fullPath": "/macros/示例/网页自动化/拖拽元素.json",
                                "relativePath": "示例/网页自动化/拖拽元素.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1146,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "提取网页信息",
                                "fullPath": "/macros/示例/网页自动化/提取网页信息.json",
                                "relativePath": "示例/网页自动化/提取网页信息.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7975,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "隐性等待",
                                "fullPath": "/macros/示例/网页自动化/隐性等待.json",
                                "relativePath": "示例/网页自动化/隐性等待.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2108,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            }
                        ]
                    }
                ]
            },
            {
                "dir": "/macros",
                "name": "Embedded_verifyElementPresent",
                "fullPath": "/macros/Embedded_verifyElementPresent.json",
                "relativePath": "Embedded_verifyElementPresent.json",
                "isFile": true,
                "isDirectory": false,
                "size": 452,
                "lastModified": "2025-01-09T06:50:59.491Z",
                "children": []
            }
        ], // 用例目录结构
        "testSuitesExtra": {},
        "testSuitesFolderStructure": [],
        "editing": {
            "commands": [
                {
                    "cmd": "store",
                    "target": "fast",
                    "value": "!replayspeed",
                    "description": ""
                },
                {
                    "cmd": "open",
                    "target": "https://ui.vision/demo/executeScript",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "executeScript",
                    "target": "return (new Date().getHours())",
                    "value": "mytime",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "mytime = ${mytime}",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "if",
                    "target": "${mytime}  > 16",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "else",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "end",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "storeAttribute",
                    "target": "//input[@id='sometext-WRONG-ID-TEST']@size",
                    "value": "boxsize",
                    "description": ""
                },
                {
                    "cmd": "if",
                    "target": "${boxsize} == \"#LNF\"",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).",
                    "value": "blue",
                    "description": ""
                },
                {
                    "cmd": "storeAttribute",
                    "target": "//input[@id='sometext']@size",
                    "value": "boxsize",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "With correct Xpath ID we get: Boxsize = ${boxsize}",
                    "value": "green",
                    "description": ""
                },
                {
                    "cmd": "end",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "gotoIf",
                    "target": "${boxsize} > 70",
                    "value": "BOX-TOO-BIG",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometext",
                    "value": "This box is ${boxsize} chars wide",
                    "description": ""
                },
                {
                    "cmd": "executeScript",
                    "target": "document.title = ${boxsize};",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "gotoLabel",
                    "target": "END",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "BOX-TOO-BIG",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "Input box too big. This is just a test of gotoIf",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "executeScript",
                    "target": "document.title = \"Just a gotoIf test. This line should not be reached unless you edit the macro\"",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "END",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "test case completed",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "comment",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "onError",
                    "target": "#goto",
                    "value": "fixerror",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometext",
                    "value": "this line works",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometextXXXXX",
                    "value": "this line has the wrong ID...",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "this line is never reached, because of the error above",
                    "value": "blue",
                    "description": ""
                },
                {
                    "cmd": "gotoLabel",
                    "target": "end-part2",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "fixerror",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "here we can have code that handles the error..",
                    "value": "green",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometext",
                    "value": "Fix Error Section: This command works.",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "end-part2",
                    "value": "",
                    "description": ""
                }
            ],
            "meta": {
                "selectedIndex": -1,
                "hasUnsaved": false,
                "src": {
                    "id": "/macros/示例/网页自动化/使用IfElse.json",
                    "name": "使用IfElse"
                }
            }
        }, // 编辑中的表格视图数据
        "editingSource": {
            "original": "{\n  \"Name\": \"使用IfElse\",\n  \"CreationDate\": \"2025-5-29\",\n  \"Commands\": [\n    {\n      \"Command\": \"store\",\n      \"Target\": \"fast\",\n      \"Value\": \"!replayspeed\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"open\",\n      \"Target\": \"https://ui.vision/demo/executeScript\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"return (new Date().getHours())\",\n      \"Value\": \"mytime\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"mytime = ${mytime}\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${mytime}  > 16\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"else\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext-WRONG-ID-TEST']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${boxsize} == \\\"#LNF\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"With correct Xpath ID we get: Boxsize = ${boxsize}\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoIf\",\n      \"Target\": \"${boxsize} > 70\",\n      \"Value\": \"BOX-TOO-BIG\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"This box is ${boxsize} chars wide\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = ${boxsize};\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"BOX-TOO-BIG\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"Input box too big. This is just a test of gotoIf\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = \\\"Just a gotoIf test. This line should not be reached unless you edit the macro\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"test case completed\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"comment\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"onError\",\n      \"Target\": \"#goto\",\n      \"Value\": \"fixerror\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"this line works\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometextXXXXX\",\n      \"Value\": \"this line has the wrong ID...\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"this line is never reached, because of the error above\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"fixerror\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"here we can have code that handles the error..\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"Fix Error Section: This command works.\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    }\n  ]\n}",
            "pure": "{\n  \"Name\": \"使用IfElse\",\n  \"CreationDate\": \"2025-5-29\",\n  \"Commands\": [\n    {\n      \"Command\": \"store\",\n      \"Target\": \"fast\",\n      \"Value\": \"!replayspeed\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"open\",\n      \"Target\": \"https://ui.vision/demo/executeScript\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"return (new Date().getHours())\",\n      \"Value\": \"mytime\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"mytime = ${mytime}\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${mytime}  > 16\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"else\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext-WRONG-ID-TEST']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${boxsize} == \\\"#LNF\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"With correct Xpath ID we get: Boxsize = ${boxsize}\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoIf\",\n      \"Target\": \"${boxsize} > 70\",\n      \"Value\": \"BOX-TOO-BIG\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"This box is ${boxsize} chars wide\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = ${boxsize};\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"BOX-TOO-BIG\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"Input box too big. This is just a test of gotoIf\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = \\\"Just a gotoIf test. This line should not be reached unless you edit the macro\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"test case completed\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"comment\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"onError\",\n      \"Target\": \"#goto\",\n      \"Value\": \"fixerror\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"this line works\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometextXXXXX\",\n      \"Value\": \"this line has the wrong ID...\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"this line is never reached, because of the error above\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"fixerror\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"here we can have code that handles the error..\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"Fix Error Section: This command works.\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    }\n  ]\n}",
            "current": "{\n  \"Name\": \"使用IfElse\",\n  \"CreationDate\": \"2025-5-29\",\n  \"Commands\": [\n    {\n      \"Command\": \"store\",\n      \"Target\": \"fast\",\n      \"Value\": \"!replayspeed\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"open\",\n      \"Target\": \"https://ui.vision/demo/executeScript\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"return (new Date().getHours())\",\n      \"Value\": \"mytime\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"mytime = ${mytime}\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${mytime}  > 16\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"else\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext-WRONG-ID-TEST']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${boxsize} == \\\"#LNF\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"With correct Xpath ID we get: Boxsize = ${boxsize}\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoIf\",\n      \"Target\": \"${boxsize} > 70\",\n      \"Value\": \"BOX-TOO-BIG\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"This box is ${boxsize} chars wide\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = ${boxsize};\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"BOX-TOO-BIG\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"Input box too big. This is just a test of gotoIf\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = \\\"Just a gotoIf test. This line should not be reached unless you edit the macro\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"test case completed\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"comment\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"onError\",\n      \"Target\": \"#goto\",\n      \"Value\": \"fixerror\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"this line works\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometextXXXXX\",\n      \"Value\": \"this line has the wrong ID...\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"this line is never reached, because of the error above\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"fixerror\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"here we can have code that handles the error..\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"Fix Error Section: This command works.\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    }\n  ]\n}",
            "error": null
        }, // 编辑中的源码视图数据
        "clipboard": {
            "commands": []
        },
        "activeTab": "table_view", // 当前视图
        "isDraggingCommand": false  // 是否在拖拽命令
    },
    "player": {
        "mode": "TEST_CASE", // 回放模式
        "status": "STOPPED", // 回放状态
        "stopReason": null, // 停止原因
        "currentLoop": 0, // 当前循环次数
        "loops": 0, // 总循环次数
        "nextCommandIndex": null, // 下一个命令的索引
        "playInterval": 0, // 回放时间间隔
        "timeoutStatus": {
            "type": null, // 超时类型
            "total": null, //
            "past": null
        }
    },
    "recorder": {
        "skipOpen": false // 跳过打开窗口
    },
    "variables": [], // 变量
    "logs": [], // 日志
    "screenshots": [
        {
            "name": "__last_desktop_screenshot.png",
            "fullPath": "/screenshots/__last_desktop_screenshot.png",
            "createTime": "2025-05-26T00:58:31.249Z"
        },
        {
            "name": "__lastscreenshot.png",
            "fullPath": "/screenshots/__lastscreenshot.png",
            "createTime": "2025-05-26T00:58:31.249Z"
        },
        {
            "name": "article1.png",
            "fullPath": "/screenshots/article1.png",
            "createTime": "2024-12-24T01:31:38.075Z"
        },
        {
            "name": "article2.png",
            "fullPath": "/screenshots/article2.png",
            "createTime": "2024-12-24T01:32:03.221Z"
        },
        {
            "name": "article2_just_viewport.png",
            "fullPath": "/screenshots/article2_just_viewport.png",
            "createTime": "2024-12-24T01:32:05.365Z"
        },
        {
            "name": "autofill1stpage1.png",
            "fullPath": "/screenshots/autofill1stpage1.png",
            "createTime": "2024-12-24T01:17:27.527Z"
        },
        {
            "name": "autofill2ndpage1.png",
            "fullPath": "/screenshots/autofill2ndpage1.png",
            "createTime": "2024-12-24T01:17:30.579Z"
        },
        {
            "name": "autofill3rdpage1.png",
            "fullPath": "/screenshots/autofill3rdpage1.png",
            "createTime": "2024-12-24T01:17:34.463Z"
        },
        {
            "name": "blogtitle.png",
            "fullPath": "/screenshots/blogtitle.png",
            "createTime": "2024-12-24T01:32:06.442Z"
        },
        {
            "name": "myscreenshot_70.png",
            "fullPath": "/screenshots/myscreenshot_70.png",
            "createTime": "2024-12-25T02:04:10.096Z"
        },
        {
            "name": "pagetitle.png",
            "fullPath": "/screenshots/pagetitle.png",
            "createTime": "2024-12-25T02:04:10.433Z"
        },
        {
            "name": "rpablog.png",
            "fullPath": "/screenshots/rpablog.png",
            "createTime": "2024-12-24T01:31:16.583Z"
        }
    ], // 截图
    "csvs": [
        {
            "name": "currencyconverterdata.csv",
            "size": 164,
            "fullPath": "/spreadsheets/currencyconverterdata.csv",
            "createTime": "2024-12-25T02:10:37.419Z"
        },
        {
            "name": "data_from_array.csv",
            "size": 76,
            "fullPath": "/spreadsheets/data_from_array.csv",
            "createTime": "2024-12-24T01:21:29.487Z"
        },
        {
            "name": "readcsvtestdata.csv",
            "size": 123,
            "fullPath": "/spreadsheets/readcsvtestdata.csv",
            "createTime": "2024-12-23T01:59:12.594Z"
        }
    ], // csv
    "visions": [
        {
            "name": "canvas_3dots_verify_dpi_96.png",
            "fullPath": "/visions/canvas_3dots_verify_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_hydepark_dpi_96.png",
            "fullPath": "/visions/canvas_hydepark_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_hydepark_extract_dpi_96_relative.png",
            "fullPath": "/visions/canvas_hydepark_extract_dpi_96_relative.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_hydepark_verify_dpi_96.png",
            "fullPath": "/visions/canvas_hydepark_verify_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_wyoming_dpi_96.png",
            "fullPath": "/visions/canvas_wyoming_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_wyoming_verify_dpi_96.png",
            "fullPath": "/visions/canvas_wyoming_verify_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "democv_checkoverlay.png",
            "fullPath": "/visions/democv_checkoverlay.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "democv_ocrdone.png",
            "fullPath": "/visions/democv_ocrdone.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "democv_share.png",
            "fullPath": "/visions/democv_share.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "democv_startocr.png",
            "fullPath": "/visions/democv_startocr.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_area_bottomright_dpi_96.png",
            "fullPath": "/visions/desktop_area_bottomright_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_area_topleft3_dpi_96.png",
            "fullPath": "/visions/desktop_area_topleft3_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_check_v_tab_dpi_96.png",
            "fullPath": "/visions/desktop_check_v_tab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_clearbutton_dpi_96.png",
            "fullPath": "/visions/desktop_clearbutton_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_logstab_grey_dpi_96.png",
            "fullPath": "/visions/desktop_logstab_grey_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_logstab_white_dpi_96.png",
            "fullPath": "/visions/desktop_logstab_white_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_scrtab_dpi_96.png",
            "fullPath": "/visions/desktop_scrtab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_searcharea_dpi_96_relative.png",
            "fullPath": "/visions/desktop_searcharea_dpi_96_relative.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_vartab_dpi_96.png",
            "fullPath": "/visions/desktop_vartab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "desktop_vitab_dpi_96.png",
            "fullPath": "/visions/desktop_vitab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_canvas_dpi_96.png",
            "fullPath": "/visions/draw_canvas_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_checkresult1_dpi_96.png",
            "fullPath": "/visions/draw_checkresult1_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_pencil_dpi_96.png",
            "fullPath": "/visions/draw_pencil_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_plus_dpi_96.png",
            "fullPath": "/visions/draw_plus_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_redbutton_dpi_96.png",
            "fullPath": "/visions/draw_redbutton_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_startingpoint_dpi_96.png",
            "fullPath": "/visions/draw_startingpoint_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_text1_dpi_96.png",
            "fullPath": "/visions/draw_text1_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "emsjzy_dpi_144.png",
            "fullPath": "/visions/emsjzy_dpi_144.png",
            "createTime": "2024-12-25T03:32:33.637Z"
        },
        {
            "name": "getquotenumber_dpi_96_relative.png",
            "fullPath": "/visions/getquotenumber_dpi_96_relative.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "lv9ybu_dpi_144.png",
            "fullPath": "/visions/lv9ybu_dpi_144.png",
            "createTime": "2024-12-25T03:30:14.614Z"
        },
        {
            "name": "mnuyhp_dpi_144.png",
            "fullPath": "/visions/mnuyhp_dpi_144.png",
            "createTime": "2024-12-24T02:27:23.570Z"
        },
        {
            "name": "pdftest_salesquote.png",
            "fullPath": "/visions/pdftest_salesquote.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "sgtv1f_dpi_144.png",
            "fullPath": "/visions/sgtv1f_dpi_144.png",
            "createTime": "2024-12-25T02:48:50.705Z"
        },
        {
            "name": "slider_handle_dpi_96.png",
            "fullPath": "/visions/slider_handle_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "slider_red_dpi_96.png",
            "fullPath": "/visions/slider_red_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "uitest_download_dpi_96.png",
            "fullPath": "/visions/uitest_download_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_hamburger_dpi_96.png",
            "fullPath": "/visions/uitest_hamburger_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_logo_mobile_dpi_96.png",
            "fullPath": "/visions/uitest_logo_mobile_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_logo_wide_dpi_96.png",
            "fullPath": "/visions/uitest_logo_wide_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_share_dpi_96.png",
            "fullPath": "/visions/uitest_share_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "youtube_play_button.png",
            "fullPath": "/visions/youtube_play_button.png",
            "createTime": "2024-12-23T01:59:12.601Z"
        },
        {
            "name": "youtube_video_content_verify.png",
            "fullPath": "/visions/youtube_video_content_verify.png",
            "createTime": "2024-12-23T01:59:12.602Z"
        }
    ], // 视觉图像
    "config": {
        "showSidePanel": false, // 显示侧边栏
        "useDarkTheme": false, // 使用暗黑主题
        "sidePanelOnLeft": false, // 侧边栏在左侧
        "anthropicAPIKey": "261a1412798a37a8d33af6da6cc26da3:bGl3ZWlzdW1Ab3V0bG9vay5jb20=", // 算法模型key
        "aiComputerUseMaxLoops": 20, // AI最大次数
        "useInitialPromptInAiChat": true, // 
        "aiChatSidebarPrompt": "Describe what you see, in 10 words or less.",
        "showSettingsOnStart": false,
        "showSidebar": false,
        "showBottomArea": true,
        "playScrollElementsIntoView": true,
        "playHighlightElements": true,
        "playCommandInterval": 0.3,
        "saveAlternativeLocators": true,
        "recordNotification": true,
        "recordClickType": "click",
        "showTestCaseTab": false,
        "logFilter": "All",
        "onErrorInLoop": "continue_next_loop",
        "allowRunFromBookmark": true,
        "allowRunFromFileSchema": true,
        "allowRunFromHttpSchema": true,
        "timeoutPageLoad": 60,
        "timeoutElement": 10,
        "timeoutMacro": 0,
        "timeoutDownload": 60,
        "lastBackupActionTime": 1747979569779,
        "enableAutoBackup": true,
        "autoBackupInterval": 7,
        "autoBackupTestCases": true,
        "autoBackupTestSuites": true,
        "autoBackupScreenshots": true,
        "autoBackupCSVFiles": true,
        "autoBackupVisionImages": true,
        "shouldEncryptPassword": "master_password",
        "masterPassword": "",
        "showCommonInternalVariables": true,
        "showAdvancedInternalVariables": false,
        "storageMode": "browser",
        "xmodulesStatus": "unregistered",
        "ocrCalibration": 6,
        "ocrCalibration_internal": 6,
        "ocrScaling": 100,
        "ocrEngine": 98,
        "ocrMode": "enabled",
        "ocrLanguage": "eng",
        "ocrLanguageOption": [
            {
                "text": "Arabic",
                "value": "ara"
            },
            {
                "text": "ChineseSimplified",
                "value": "chs"
            },
            {
                "text": "ChineseTraditional",
                "value": "cht"
            },
            {
                "text": "Czech",
                "value": "ce"
            },
            {
                "text": "Danish",
                "value": "dan"
            },
            {
                "text": "Dutch",
                "value": "dut"
            },
            {
                "text": "English",
                "value": "eng"
            },
            {
                "text": "Finnish",
                "value": "fin"
            },
            {
                "text": "French",
                "value": "fre"
            },
            {
                "text": "German",
                "value": "ger"
            },
            {
                "text": "Greek",
                "value": "gre"
            },
            {
                "text": "Hungarian",
                "value": "hun"
            },
            {
                "text": "Italian",
                "value": "ita"
            },
            {
                "text": "Japanese",
                "value": "jpn"
            },
            {
                "text": "Korean",
                "value": "kor"
            },
            {
                "text": "Norwegian",
                "value": "nor"
            },
            {
                "text": "Polish",
                "value": "pol"
            },
            {
                "text": "Portuguese",
                "value": "por"
            },
            {
                "text": "Russian",
                "value": "rus"
            },
            {
                "text": "Spanish",
                "value": "spa"
            },
            {
                "text": "Swedish",
                "value": "swe"
            },
            {
                "text": "Turkish",
                "value": "tur"
            }
        ],
        "ocrOfflineURL": "",
        "ocrOfflineAPIKey": "",
        "cvScope": "browser",
        "defaultVisionSearchConfidence": 0.6,
        "useDesktopScreenCapture": true,
        "waitBeforeDesktopScreenCapture": false,
        "secondsBeforeDesktopScreenCapture": 3,
        "defaultProxy": "",
        "defaultProxyAuth": "",
        "turnOffProxyAfterReplay": true,
        "disableOpenSidepanelBtnTemporarily": false,
        "oneTimeShowSidePanel": null,
        "size": {
            "standard": {
                "height": 912,
                "width": 1707
            }
        },
        "websiteWhiteList": [
            "http://127.0.0.1:5500/ui.vision.html"
        ]
    },
    "proxy": null,
    "ui": {
        "focusArea": "sidebar",
        "isSaving": false
    },
    "macroQuery": ""
}

const state2 = {
    "count": 0,
    "status": "PLAYER",
    "recorderStatus": "STOPPED",
    "inspectorStatus": "STOPPED",
    "isLoadingMacros": false,
    "from": "manual",
    "noDisplayInPlay": false,
    "ocrInDesktopMode": false,
    "replaySpeedOverrideToFastMode": false,
    "editor": {
        "testSuites": [],
        "testCases": [],
        "currentMacro": {
            "id": "/macros/示例/网页自动化/使用IfElse.json",
            "data": {
                "commands": [
                    {
                        "cmd": "store",
                        "target": "fast",
                        "value": "!replayspeed",
                        "description": ""
                    },
                    {
                        "cmd": "open",
                        "target": "https://ui.vision/demo/executeScript",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "executeScript",
                        "target": "return (new Date().getHours())",
                        "value": "mytime",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "mytime = ${mytime}",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "if",
                        "target": "${mytime}  > 16",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "下午好！",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "else",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "上午好",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "end",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "storeAttribute",
                        "target": "//input[@id='sometext-WRONG-ID-TEST']@size",
                        "value": "boxsize",
                        "description": ""
                    },
                    {
                        "cmd": "if",
                        "target": "${boxsize} == \"#LNF\"",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).",
                        "value": "blue",
                        "description": ""
                    },
                    {
                        "cmd": "storeAttribute",
                        "target": "//input[@id='sometext']@size",
                        "value": "boxsize",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "With correct Xpath ID we get: Boxsize = ${boxsize}",
                        "value": "green",
                        "description": ""
                    },
                    {
                        "cmd": "end",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "gotoIf",
                        "target": "${boxsize} > 70",
                        "value": "BOX-TOO-BIG",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometext",
                        "value": "This box is ${boxsize} chars wide",
                        "description": ""
                    },
                    {
                        "cmd": "executeScript",
                        "target": "document.title = ${boxsize};",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "gotoLabel",
                        "target": "END",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "BOX-TOO-BIG",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "Input box too big. This is just a test of gotoIf",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "executeScript",
                        "target": "document.title = \"Just a gotoIf test. This line should not be reached unless you edit the macro\"",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "END",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "test case completed",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "comment",
                        "target": "",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "onError",
                        "target": "#goto",
                        "value": "fixerror",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometext",
                        "value": "this line works",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometextXXXXX",
                        "value": "this line has the wrong ID...",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "this line is never reached, because of the error above",
                        "value": "blue",
                        "description": ""
                    },
                    {
                        "cmd": "gotoLabel",
                        "target": "end-part2",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "fixerror",
                        "value": "",
                        "description": ""
                    },
                    {
                        "cmd": "echo",
                        "target": "here we can have code that handles the error..",
                        "value": "green",
                        "description": ""
                    },
                    {
                        "cmd": "type",
                        "target": "id=sometext",
                        "value": "Fix Error Section: This command works.",
                        "description": ""
                    },
                    {
                        "cmd": "label",
                        "target": "end-part2",
                        "value": "",
                        "description": ""
                    }
                ]
            },
            "name": "使用IfElse",
            "path": "示例/网页自动化/使用IfElse.json"
        },
        "macrosExtra": {
            "/macros/Demo": {
                "folded": false
            },
            "/macros/Demo/AI(Beta)": {
                "folded": true
            },
            "/macros/Demo/AI(Beta)/CU_FillForm.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    3
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/AI(Beta)/CU_PlayTicTacToe.json": {},
            "/macros/Demo/AI(Beta)/CU_PressClear_Desktop.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    1
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/AI(Beta)/ScreenXY_SearchForum.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core": {
                "folded": false
            },
            "/macros/Demo/Core/DemoAutofill.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    3
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoCsvReadArray.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoCsvReadWithWhile.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [
                    12
                ]
            },
            "/macros/Demo/Core/DemoCsvSave.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoDownload.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    7
                ],
                "status": null,
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoDragDrop.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoExecuteScript.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoExtract.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoFrames.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    26
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoIfElse.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [
                    10,
                    28
                ]
            },
            "/macros/Demo/Core/DemoIframe.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    5
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoImplicitWaiting.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoTabs.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/DemoTakeScreenshots.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/Sub": {
                "folded": true
            },
            "/macros/Demo/Core/Sub/Sub_DemoCsvRead_FillForm.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/使用IfElse.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [
                    10,
                    28
                ]
            },
            "/macros/Demo/Core/保存为Csv.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/Core/隐性等待.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules": {
                "folded": true
            },
            "/macros/Demo/XModules/DemoPDFTest_with_OCR.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    29
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoVisualUITest.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": [
                    3,
                    6
                ]
            },
            "/macros/Demo/XModules/DemoXClick.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXClickTextRelative.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    21
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXMove.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXRun.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/DemoXType.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/PDF使用OCR检查.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [
                    29
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/XClick 点击画图.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/XMove 拖动.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules/XRun运行其他程序.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop": {
                "folded": false
            },
            "/macros/Demo/XModules_Desktop/DemoAutomateChromeDevTools.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/DemoXDesktopAutomation.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/Sub": {
                "folded": false
            },
            "/macros/Demo/XModules_Desktop/Sub/Sub_XDesktopAutomation_Area.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/桌面自动化.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_Desktop/自动化打开ChromeDevTools.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_桌面自动化": {
                "folded": true
            },
            "/macros/Demo/XModules_桌面自动化/Sub": {
                "folded": true
            },
            "/macros/Demo/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_桌面自动化/桌面自动化.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/Demo/XModules_网页自动化": {
                "folded": true
            },
            "/macros/Demo/XModules网页自动化": {
                "folded": true
            },
            "/macros/Demo/网页自动化": {
                "folded": true
            },
            "/macros/Demo/网页自动化/Sub": {
                "folded": true
            },
            "/macros/Demo/网页自动化/多Frame嵌套.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    0
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/Embedded_verifyElementPresent.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/测试": {
                "folded": true
            },
            "/macros/测试/录制.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6
                ],
                "errorCommandIndices": [
                    7
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/测试/测试录制.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/示例": {
                "folded": false
            },
            "/macros/示例/AI(Beta)": {
                "folded": true
            },
            "/macros/示例/XModules_桌面自动化": {
                "folded": true
            },
            "/macros/示例/XModules_桌面自动化/Sub": {
                "folded": false
            },
            "/macros/示例/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json": {
                "doneCommandIndices": [
                    0,
                    1,
                    2,
                    3,
                    4
                ],
                "errorCommandIndices": [
                    5
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/示例/XModules_桌面自动化/桌面自动化.json": {
                "doneCommandIndices": [
                    0,
                    1,
                    2
                ],
                "errorCommandIndices": [],
                "status": "ERROR_IN_SUB",
                "warningCommandIndices": []
            },
            "/macros/示例/XModules_桌面自动化/自动化打开ChromeDevTools.json": {
                "doneCommandIndices": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    8,
                    9,
                    10,
                    11,
                    12,
                    13,
                    16,
                    17,
                    20,
                    21,
                    22,
                    23,
                    24,
                    25,
                    26,
                    27,
                    28
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/示例/XModules_网页自动化": {
                "folded": true
            },
            "/macros/示例/XModules_网页自动化/XClick 点击画图.json": {
                "doneCommandIndices": [
                    0
                ],
                "errorCommandIndices": [],
                "status": "SUCCESS",
                "warningCommandIndices": []
            },
            "/macros/示例/网页自动化": {
                "folded": false
            },
            "/macros/示例/网页自动化/Sub": {
                "folded": false
            },
            "/macros/示例/网页自动化/使用IfElse.json": {
                "breakpointIndices": [],
                "doneCommandIndices": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    11,
                    12,
                    13,
                    14,
                    15
                ],
                "errorCommandIndices": [],
                "status": "ERROR",
                "warningCommandIndices": []
            },
            "/macros/示例/网页自动化/多Frame嵌套.json": {
                "doneCommandIndices": [],
                "errorCommandIndices": [
                    0
                ],
                "status": "ERROR",
                "warningCommandIndices": []
            }
        },
        "macroFolderStructure": [
            {
                "dir": "/macros",
                "name": "测试",
                "fullPath": "/macros/测试",
                "relativePath": "测试",
                "isFile": false,
                "isDirectory": true,
                "size": 0,
                "lastModified": "1970-01-01T00:00:00.000Z",
                "children": [
                    {
                        "dir": "/macros/测试",
                        "name": "录制",
                        "fullPath": "/macros/测试/录制.json",
                        "relativePath": "测试/录制.json",
                        "isFile": true,
                        "isDirectory": false,
                        "size": 1982,
                        "lastModified": "2024-12-25T03:02:21.322Z",
                        "children": []
                    },
                    {
                        "dir": "/macros/测试",
                        "name": "测试录制",
                        "fullPath": "/macros/测试/测试录制.json",
                        "relativePath": "测试/测试录制.json",
                        "isFile": true,
                        "isDirectory": false,
                        "size": 3976,
                        "lastModified": "2024-12-25T07:02:10.915Z",
                        "children": []
                    }
                ]
            },
            {
                "dir": "/macros",
                "name": "示例",
                "fullPath": "/macros/示例",
                "relativePath": "示例",
                "isFile": false,
                "isDirectory": true,
                "size": 0,
                "lastModified": "1970-01-01T00:00:00.000Z",
                "children": [
                    {
                        "dir": "/macros/示例",
                        "name": "AI(Beta)",
                        "fullPath": "/macros/示例/AI(Beta)",
                        "relativePath": "示例/AI(Beta)",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_FillForm",
                                "fullPath": "/macros/示例/AI(Beta)/CU_FillForm.json",
                                "relativePath": "示例/AI(Beta)/CU_FillForm.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2219,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_PlayTicTacToe",
                                "fullPath": "/macros/示例/AI(Beta)/CU_PlayTicTacToe.json",
                                "relativePath": "示例/AI(Beta)/CU_PlayTicTacToe.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2798,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_PressClear_Desktop",
                                "fullPath": "/macros/示例/AI(Beta)/CU_PressClear_Desktop.json",
                                "relativePath": "示例/AI(Beta)/CU_PressClear_Desktop.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1658,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "CU_UseWebCalculator",
                                "fullPath": "/macros/示例/AI(Beta)/CU_UseWebCalculator.json",
                                "relativePath": "示例/AI(Beta)/CU_UseWebCalculator.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2050,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "Prompt_CompareImages",
                                "fullPath": "/macros/示例/AI(Beta)/Prompt_CompareImages.json",
                                "relativePath": "示例/AI(Beta)/Prompt_CompareImages.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1190,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "Prompt_ParseHTML",
                                "fullPath": "/macros/示例/AI(Beta)/Prompt_ParseHTML.json",
                                "relativePath": "示例/AI(Beta)/Prompt_ParseHTML.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2258,
                                "lastModified": "2024-12-27T06:45:26.793Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "ScreenXY_PressClear_Desktop",
                                "fullPath": "/macros/示例/AI(Beta)/ScreenXY_PressClear_Desktop.json",
                                "relativePath": "示例/AI(Beta)/ScreenXY_PressClear_Desktop.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1777,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/AI(Beta)",
                                "name": "ScreenXY_SearchForum",
                                "fullPath": "/macros/示例/AI(Beta)/ScreenXY_SearchForum.json",
                                "relativePath": "示例/AI(Beta)/ScreenXY_SearchForum.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1624,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            }
                        ]
                    },
                    {
                        "dir": "/macros/示例",
                        "name": "XModules_桌面自动化",
                        "fullPath": "/macros/示例/XModules_桌面自动化",
                        "relativePath": "示例/XModules_桌面自动化",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/XModules_桌面自动化",
                                "name": "Sub",
                                "fullPath": "/macros/示例/XModules_桌面自动化/Sub",
                                "relativePath": "示例/XModules_桌面自动化/Sub",
                                "isFile": false,
                                "isDirectory": true,
                                "size": 0,
                                "lastModified": "1970-01-01T00:00:00.000Z",
                                "children": [
                                    {
                                        "dir": "/macros/示例/XModules_桌面自动化/Sub",
                                        "name": "Sub_XDesktopAutomation_Area",
                                        "fullPath": "/macros/示例/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json",
                                        "relativePath": "示例/XModules_桌面自动化/Sub/Sub_XDesktopAutomation_Area.json",
                                        "isFile": true,
                                        "isDirectory": false,
                                        "size": 2016,
                                        "lastModified": "2024-12-27T06:45:26.814Z",
                                        "children": []
                                    }
                                ]
                            },
                            {
                                "dir": "/macros/示例/XModules_桌面自动化",
                                "name": "桌面自动化",
                                "fullPath": "/macros/示例/XModules_桌面自动化/桌面自动化.json",
                                "relativePath": "示例/XModules_桌面自动化/桌面自动化.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2809,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_桌面自动化",
                                "name": "自动化打开ChromeDevTools",
                                "fullPath": "/macros/示例/XModules_桌面自动化/自动化打开ChromeDevTools.json",
                                "relativePath": "示例/XModules_桌面自动化/自动化打开ChromeDevTools.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 4735,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            }
                        ]
                    },
                    {
                        "dir": "/macros/示例",
                        "name": "XModules_网页自动化",
                        "fullPath": "/macros/示例/XModules_网页自动化",
                        "relativePath": "示例/XModules_网页自动化",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "PDF使用OCR检查",
                                "fullPath": "/macros/示例/XModules_网页自动化/PDF使用OCR检查.json",
                                "relativePath": "示例/XModules_网页自动化/PDF使用OCR检查.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7810,
                                "lastModified": "2024-12-27T06:45:26.794Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XClick 点击画图",
                                "fullPath": "/macros/示例/XModules_网页自动化/XClick 点击画图.json",
                                "relativePath": "示例/XModules_网页自动化/XClick 点击画图.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7039,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XClick点击相关文字",
                                "fullPath": "/macros/示例/XModules_网页自动化/XClick点击相关文字.json",
                                "relativePath": "示例/XModules_网页自动化/XClick点击相关文字.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3714,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XMove 拖动",
                                "fullPath": "/macros/示例/XModules_网页自动化/XMove 拖动.json",
                                "relativePath": "示例/XModules_网页自动化/XMove 拖动.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2950,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XRun运行其他程序",
                                "fullPath": "/macros/示例/XModules_网页自动化/XRun运行其他程序.json",
                                "relativePath": "示例/XModules_网页自动化/XRun运行其他程序.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2309,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "XType 键盘输入",
                                "fullPath": "/macros/示例/XModules_网页自动化/XType 键盘输入.json",
                                "relativePath": "示例/XModules_网页自动化/XType 键盘输入.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3091,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/XModules_网页自动化",
                                "name": "可视化UI测试",
                                "fullPath": "/macros/示例/XModules_网页自动化/可视化UI测试.json",
                                "relativePath": "示例/XModules_网页自动化/可视化UI测试.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2796,
                                "lastModified": "2024-12-27T06:45:26.795Z",
                                "children": []
                            }
                        ]
                    },
                    {
                        "dir": "/macros/示例",
                        "name": "网页自动化",
                        "fullPath": "/macros/示例/网页自动化",
                        "relativePath": "示例/网页自动化",
                        "isFile": false,
                        "isDirectory": true,
                        "size": 0,
                        "lastModified": "1970-01-01T00:00:00.000Z",
                        "children": [
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "Sub",
                                "fullPath": "/macros/示例/网页自动化/Sub",
                                "relativePath": "示例/网页自动化/Sub",
                                "isFile": false,
                                "isDirectory": true,
                                "size": 0,
                                "lastModified": "1970-01-01T00:00:00.000Z",
                                "children": [
                                    {
                                        "dir": "/macros/示例/网页自动化/Sub",
                                        "name": "Sub_DemoCsvRead_FillForm",
                                        "fullPath": "/macros/示例/网页自动化/Sub/Sub_DemoCsvRead_FillForm.json",
                                        "relativePath": "示例/网页自动化/Sub/Sub_DemoCsvRead_FillForm.json",
                                        "isFile": true,
                                        "isDirectory": false,
                                        "size": 1244,
                                        "lastModified": "2024-12-27T06:45:26.814Z",
                                        "children": []
                                    }
                                ]
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "DemoAutofill",
                                "fullPath": "/macros/示例/网页自动化/DemoAutofill.json",
                                "relativePath": "示例/网页自动化/DemoAutofill.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3293,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "DemoCsvReadArray",
                                "fullPath": "/macros/示例/网页自动化/DemoCsvReadArray.json",
                                "relativePath": "示例/网页自动化/DemoCsvReadArray.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 4261,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "DemoCsvReadWithWhile",
                                "fullPath": "/macros/示例/网页自动化/DemoCsvReadWithWhile.json",
                                "relativePath": "示例/网页自动化/DemoCsvReadWithWhile.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2122,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "Iframe",
                                "fullPath": "/macros/示例/网页自动化/Iframe.json",
                                "relativePath": "示例/网页自动化/Iframe.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1663,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "下载文件",
                                "fullPath": "/macros/示例/网页自动化/下载文件.json",
                                "relativePath": "示例/网页自动化/下载文件.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2914,
                                "lastModified": "2024-12-27T06:45:26.798Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "使用IfElse",
                                "fullPath": "/macros/示例/网页自动化/使用IfElse.json",
                                "relativePath": "示例/网页自动化/使用IfElse.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 5397,
                                "lastModified": "2025-05-22T07:49:00.044Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "保存为Csv",
                                "fullPath": "/macros/示例/网页自动化/保存为Csv.json",
                                "relativePath": "示例/网页自动化/保存为Csv.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2810,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "多Frame嵌套",
                                "fullPath": "/macros/示例/网页自动化/多Frame嵌套.json",
                                "relativePath": "示例/网页自动化/多Frame嵌套.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 4740,
                                "lastModified": "2024-12-31T06:17:46.279Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "多Tabs",
                                "fullPath": "/macros/示例/网页自动化/多Tabs.json",
                                "relativePath": "示例/网页自动化/多Tabs.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 3518,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "截图",
                                "fullPath": "/macros/示例/网页自动化/截图.json",
                                "relativePath": "示例/网页自动化/截图.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2525,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "执行脚本",
                                "fullPath": "/macros/示例/网页自动化/执行脚本.json",
                                "relativePath": "示例/网页自动化/执行脚本.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7858,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "拖拽元素",
                                "fullPath": "/macros/示例/网页自动化/拖拽元素.json",
                                "relativePath": "示例/网页自动化/拖拽元素.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 1146,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "提取网页信息",
                                "fullPath": "/macros/示例/网页自动化/提取网页信息.json",
                                "relativePath": "示例/网页自动化/提取网页信息.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 7975,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            },
                            {
                                "dir": "/macros/示例/网页自动化",
                                "name": "隐性等待",
                                "fullPath": "/macros/示例/网页自动化/隐性等待.json",
                                "relativePath": "示例/网页自动化/隐性等待.json",
                                "isFile": true,
                                "isDirectory": false,
                                "size": 2108,
                                "lastModified": "2024-12-27T06:45:26.800Z",
                                "children": []
                            }
                        ]
                    }
                ]
            },
            {
                "dir": "/macros",
                "name": "Embedded_verifyElementPresent",
                "fullPath": "/macros/Embedded_verifyElementPresent.json",
                "relativePath": "Embedded_verifyElementPresent.json",
                "isFile": true,
                "isDirectory": false,
                "size": 452,
                "lastModified": "2025-01-09T06:50:59.491Z",
                "children": []
            }
        ],
        "testSuitesExtra": {},
        "testSuitesFolderStructure": [],
        "editing": {
            "commands": [
                {
                    "cmd": "store",
                    "target": "fast",
                    "value": "!replayspeed",
                    "description": ""
                },
                {
                    "cmd": "open",
                    "target": "https://ui.vision/demo/executeScript",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "executeScript",
                    "target": "return (new Date().getHours())",
                    "value": "mytime",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "mytime = ${mytime}",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "if",
                    "target": "${mytime}  > 16",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "下午好！",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "else",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "上午好",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "end",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "storeAttribute",
                    "target": "//input[@id='sometext-WRONG-ID-TEST']@size",
                    "value": "boxsize",
                    "description": ""
                },
                {
                    "cmd": "if",
                    "target": "${boxsize} == \"#LNF\"",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).",
                    "value": "blue",
                    "description": ""
                },
                {
                    "cmd": "storeAttribute",
                    "target": "//input[@id='sometext']@size",
                    "value": "boxsize",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "With correct Xpath ID we get: Boxsize = ${boxsize}",
                    "value": "green",
                    "description": ""
                },
                {
                    "cmd": "end",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "gotoIf",
                    "target": "${boxsize} > 70",
                    "value": "BOX-TOO-BIG",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometext",
                    "value": "This box is ${boxsize} chars wide",
                    "description": ""
                },
                {
                    "cmd": "executeScript",
                    "target": "document.title = ${boxsize};",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "gotoLabel",
                    "target": "END",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "BOX-TOO-BIG",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "Input box too big. This is just a test of gotoIf",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "executeScript",
                    "target": "document.title = \"Just a gotoIf test. This line should not be reached unless you edit the macro\"",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "END",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "test case completed",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "comment",
                    "target": "",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "onError",
                    "target": "#goto",
                    "value": "fixerror",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometext",
                    "value": "this line works",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometextXXXXX",
                    "value": "this line has the wrong ID...",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "this line is never reached, because of the error above",
                    "value": "blue",
                    "description": ""
                },
                {
                    "cmd": "gotoLabel",
                    "target": "end-part2",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "fixerror",
                    "value": "",
                    "description": ""
                },
                {
                    "cmd": "echo",
                    "target": "here we can have code that handles the error..",
                    "value": "green",
                    "description": ""
                },
                {
                    "cmd": "type",
                    "target": "id=sometext",
                    "value": "Fix Error Section: This command works.",
                    "description": ""
                },
                {
                    "cmd": "label",
                    "target": "end-part2",
                    "value": "",
                    "description": ""
                }
            ],
            "meta": {
                "selectedIndex": -1,
                "hasUnsaved": false,
                "src": {
                    "id": "/macros/示例/网页自动化/使用IfElse.json",
                    "name": "使用IfElse"
                }
            }
        },
        "editingSource": {
            "original": "{\n  \"Name\": \"使用IfElse\",\n  \"CreationDate\": \"2025-5-29\",\n  \"Commands\": [\n    {\n      \"Command\": \"store\",\n      \"Target\": \"fast\",\n      \"Value\": \"!replayspeed\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"open\",\n      \"Target\": \"https://ui.vision/demo/executeScript\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"return (new Date().getHours())\",\n      \"Value\": \"mytime\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"mytime = ${mytime}\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${mytime}  > 16\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"else\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext-WRONG-ID-TEST']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${boxsize} == \\\"#LNF\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"With correct Xpath ID we get: Boxsize = ${boxsize}\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoIf\",\n      \"Target\": \"${boxsize} > 70\",\n      \"Value\": \"BOX-TOO-BIG\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"This box is ${boxsize} chars wide\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = ${boxsize};\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"BOX-TOO-BIG\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"Input box too big. This is just a test of gotoIf\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = \\\"Just a gotoIf test. This line should not be reached unless you edit the macro\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"test case completed\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"comment\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"onError\",\n      \"Target\": \"#goto\",\n      \"Value\": \"fixerror\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"this line works\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometextXXXXX\",\n      \"Value\": \"this line has the wrong ID...\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"this line is never reached, because of the error above\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"fixerror\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"here we can have code that handles the error..\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"Fix Error Section: This command works.\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    }\n  ]\n}",
            "pure": "{\n  \"Name\": \"使用IfElse\",\n  \"CreationDate\": \"2025-5-29\",\n  \"Commands\": [\n    {\n      \"Command\": \"store\",\n      \"Target\": \"fast\",\n      \"Value\": \"!replayspeed\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"open\",\n      \"Target\": \"https://ui.vision/demo/executeScript\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"return (new Date().getHours())\",\n      \"Value\": \"mytime\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"mytime = ${mytime}\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${mytime}  > 16\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"else\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext-WRONG-ID-TEST']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${boxsize} == \\\"#LNF\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"With correct Xpath ID we get: Boxsize = ${boxsize}\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoIf\",\n      \"Target\": \"${boxsize} > 70\",\n      \"Value\": \"BOX-TOO-BIG\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"This box is ${boxsize} chars wide\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = ${boxsize};\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"BOX-TOO-BIG\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"Input box too big. This is just a test of gotoIf\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = \\\"Just a gotoIf test. This line should not be reached unless you edit the macro\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"test case completed\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"comment\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"onError\",\n      \"Target\": \"#goto\",\n      \"Value\": \"fixerror\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"this line works\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometextXXXXX\",\n      \"Value\": \"this line has the wrong ID...\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"this line is never reached, because of the error above\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"fixerror\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"here we can have code that handles the error..\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"Fix Error Section: This command works.\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    }\n  ]\n}",
            "current": "{\n  \"Name\": \"使用IfElse\",\n  \"CreationDate\": \"2025-5-29\",\n  \"Commands\": [\n    {\n      \"Command\": \"store\",\n      \"Target\": \"fast\",\n      \"Value\": \"!replayspeed\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"open\",\n      \"Target\": \"https://ui.vision/demo/executeScript\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"return (new Date().getHours())\",\n      \"Value\": \"mytime\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"mytime = ${mytime}\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${mytime}  > 16\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"下午好！\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"else\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"上午好\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext-WRONG-ID-TEST']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"if\",\n      \"Target\": \"${boxsize} == \\\"#LNF\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"The xpath was not found. In this case the variable gets filled with #LNF (Locator Not Found).\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"storeAttribute\",\n      \"Target\": \"//input[@id='sometext']@size\",\n      \"Value\": \"boxsize\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"With correct Xpath ID we get: Boxsize = ${boxsize}\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"end\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoIf\",\n      \"Target\": \"${boxsize} > 70\",\n      \"Value\": \"BOX-TOO-BIG\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"This box is ${boxsize} chars wide\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = ${boxsize};\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"BOX-TOO-BIG\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"Input box too big. This is just a test of gotoIf\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"executeScript\",\n      \"Target\": \"document.title = \\\"Just a gotoIf test. This line should not be reached unless you edit the macro\\\"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"END\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"test case completed\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"comment\",\n      \"Target\": \"\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"onError\",\n      \"Target\": \"#goto\",\n      \"Value\": \"fixerror\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"this line works\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometextXXXXX\",\n      \"Value\": \"this line has the wrong ID...\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"this line is never reached, because of the error above\",\n      \"Value\": \"blue\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"gotoLabel\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"fixerror\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"echo\",\n      \"Target\": \"here we can have code that handles the error..\",\n      \"Value\": \"green\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"type\",\n      \"Target\": \"id=sometext\",\n      \"Value\": \"Fix Error Section: This command works.\",\n      \"Description\": \"\"\n    },\n    {\n      \"Command\": \"label\",\n      \"Target\": \"end-part2\",\n      \"Value\": \"\",\n      \"Description\": \"\"\n    }\n  ]\n}",
            "error": null
        },
        "clipboard": {
            "commands": []
        },
        "activeTab": "table_view",
        "isDraggingCommand": false
    },
    "player": {
        "mode": "TEST_CASE",
        "status": "PAUSED",
        "stopReason": null,
        "currentLoop": 1,
        "loops": 1,
        "nextCommandIndex": 16,
        "playInterval": 0,
        "timeoutStatus": {
            "type": "Tag waiting",
            "past": 4000,
            "total": 10000
        }
    },
    "recorder": {
        "skipOpen": false
    },
    "variables": [
        {
            "key": "!AI1",
            "value": 0
        },
        {
            "key": "!AI2",
            "value": 0
        },
        {
            "key": "!AI3",
            "value": 0
        },
        {
            "key": "!AI4",
            "value": 0
        },
        {
            "key": "!BROWSER",
            "value": "chrome"
        },
        {
            "key": "!CSVREADLINENUMBER",
            "value": 1
        },
        {
            "key": "!CURRENT_TAB_NUMBER",
            "value": 1
        },
        {
            "key": "!CURRENT_TAB_NUMBER_RELATIVE",
            "value": 0
        },
        {
            "key": "!CURRENT_TAB_NUMBER_RELATIVE_ID",
            "value": 1398386473
        },
        {
            "key": "!CURRENT_TAB_NUMBER_RELATIVE_INDEX",
            "value": 1
        },
        {
            "key": "!CVSCOPE",
            "value": "browser"
        },
        {
            "key": "!IMAGEX",
            "value": 0
        },
        {
            "key": "!IMAGEY",
            "value": 0
        },
        {
            "key": "!LASTCOMMANDOK",
            "value": true
        },
        {
            "key": "!LAST_DOWNLOADED_FILE_NAME",
            "value": ""
        },
        {
            "key": "!LOOP",
            "value": 1
        },
        {
            "key": "!MACRONAME",
            "value": "使用IfElse"
        },
        {
            "key": "!OCRENGINE",
            "value": 98
        },
        {
            "key": "!OCRHEIGHT",
            "value": 0
        },
        {
            "key": "!OCRLANGUAGE",
            "value": "eng"
        },
        {
            "key": "!OCRWIDTH",
            "value": 0
        },
        {
            "key": "!OCRX",
            "value": 0
        },
        {
            "key": "!OCRY",
            "value": 0
        },
        {
            "key": "!OS",
            "value": "windows"
        },
        {
            "key": "!REPLAYSPEED",
            "value": "fast"
        },
        {
            "key": "!RUNTIME",
            "value": "2.76s"
        },
        {
            "key": "!STATUSOK",
            "value": true
        },
        {
            "key": "!STRINGESCAPE",
            "value": true
        },
        {
            "key": "!TESTSUITE_LOOP",
            "value": 1
        },
        {
            "key": "!TIMEOUT_DOWNLOAD",
            "value": 60
        },
        {
            "key": "!TIMEOUT_MACRO",
            "value": 0
        },
        {
            "key": "!TIMEOUT_PAGELOAD",
            "value": 60
        },
        {
            "key": "!TIMEOUT_WAIT",
            "value": 10
        },
        {
            "key": "!URL",
            "value": "https://fanyi.baidu.com/mtpe-individual/multimodal?query=replay%20Speed%20Override%20To%20Fast%20Mode&lang=en2zh"
        },
        {
            "key": "!VISUALSEARCHAREA",
            "value": "viewport"
        },
        {
            "key": "!WAITFORVISIBLE",
            "value": false
        },
        {
            "key": "MYTIME",
            "value": 10
        }
    ],
    "logs": [
        {
            "type": "status",
            "text": "Playing macro 使用IfElse",
            "options": {},
            "id": "1748485313777.6be245",
            "createTime": "2025-05-29T02:21:53.777Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": null,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | store | fast | !replayspeed | ",
            "options": {},
            "id": "1748485313843.1c8f1d",
            "createTime": "2025-05-29T02:21:53.843Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 0,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | open | https://ui.vision/demo/executeScript |  | ",
            "options": {},
            "id": "1748485313893.65886f",
            "createTime": "2025-05-29T02:21:53.893Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 1,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | echo | How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro. |  | ",
            "options": {},
            "id": "1748485316108.5f6c71",
            "createTime": "2025-05-29T02:21:56.108Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 2,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "echo",
            "text": "How to use gotoIf and label(s) for flow control. For a while/endWhile demo, see the DemoSaveCSV macro.",
            "options": {},
            "id": "1748485316128.45e302",
            "createTime": "2025-05-29T02:21:56.128Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 2,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | executeScript | return (new Date().getHours()) | mytime | ",
            "options": {},
            "id": "1748485316151.63c303",
            "createTime": "2025-05-29T02:21:56.151Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 3,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | echo | mytime = ${mytime} |  | ",
            "options": {},
            "id": "1748485316207.6292f6",
            "createTime": "2025-05-29T02:21:56.207Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 4,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "echo",
            "text": "mytime = 10",
            "options": {},
            "id": "1748485316228.2856e0",
            "createTime": "2025-05-29T02:21:56.228Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 4,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | if | ${mytime}  > 16 |  | ",
            "options": {},
            "id": "1748485316249.986562",
            "createTime": "2025-05-29T02:21:56.249Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 5,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | echo | 上午好 |  | ",
            "options": {},
            "id": "1748485316319.1dbe92",
            "createTime": "2025-05-29T02:21:56.319Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 11,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "echo",
            "text": "上午好",
            "options": {},
            "id": "1748485316345.8f87dc",
            "createTime": "2025-05-29T02:21:56.345Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 11,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | echo | 上午好 |  | ",
            "options": {},
            "id": "1748485316380.34cbb0",
            "createTime": "2025-05-29T02:21:56.380Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 12,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "echo",
            "text": "上午好",
            "options": {},
            "id": "1748485316405.73cfa9",
            "createTime": "2025-05-29T02:21:56.405Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 12,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | echo | 上午好 |  | ",
            "options": {},
            "id": "1748485316432.10502",
            "createTime": "2025-05-29T02:21:56.432Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 13,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "echo",
            "text": "上午好",
            "options": {},
            "id": "1748485316452.68f204",
            "createTime": "2025-05-29T02:21:56.452Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 13,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | echo | 上午好 |  | ",
            "options": {},
            "id": "1748485316493.79acd5",
            "createTime": "2025-05-29T02:21:56.493Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 14,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "echo",
            "text": "上午好",
            "options": {},
            "id": "1748485316511.eceb3",
            "createTime": "2025-05-29T02:21:56.511Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 14,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | end |  |  | ",
            "options": {},
            "id": "1748485316542.6d96a0",
            "createTime": "2025-05-29T02:21:56.542Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 15,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "reflect",
            "text": "Executing:  | storeAttribute | //input[@id='sometext-WRONG-ID-TEST']@size | boxsize | ",
            "options": {},
            "id": "1748485316587.3b2c72",
            "createTime": "2025-05-29T02:21:56.587Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 16,
                    "isSubroutine": false
                }
            ]
        },
        {
            "type": "status",
            "text": "Macro paused",
            "options": {},
            "id": "1748485316889.2317d1",
            "createTime": "2025-05-29T02:21:56.889Z",
            "stack": [
                {
                    "macroId": "/macros/示例/网页自动化/使用IfElse.json",
                    "macroName": "使用IfElse",
                    "commandIndex": 16,
                    "isSubroutine": false
                }
            ]
        }
    ],
    "screenshots": [
        {
            "name": "__last_desktop_screenshot.png",
            "fullPath": "/screenshots/__last_desktop_screenshot.png",
            "createTime": "2025-05-26T00:58:31.249Z"
        },
        {
            "name": "__lastscreenshot.png",
            "fullPath": "/screenshots/__lastscreenshot.png",
            "createTime": "2025-05-26T00:58:31.249Z"
        },
        {
            "name": "article1.png",
            "fullPath": "/screenshots/article1.png",
            "createTime": "2024-12-24T01:31:38.075Z"
        },
        {
            "name": "article2.png",
            "fullPath": "/screenshots/article2.png",
            "createTime": "2024-12-24T01:32:03.221Z"
        },
        {
            "name": "article2_just_viewport.png",
            "fullPath": "/screenshots/article2_just_viewport.png",
            "createTime": "2024-12-24T01:32:05.365Z"
        },
        {
            "name": "autofill1stpage1.png",
            "fullPath": "/screenshots/autofill1stpage1.png",
            "createTime": "2024-12-24T01:17:27.527Z"
        },
        {
            "name": "autofill2ndpage1.png",
            "fullPath": "/screenshots/autofill2ndpage1.png",
            "createTime": "2024-12-24T01:17:30.579Z"
        },
        {
            "name": "autofill3rdpage1.png",
            "fullPath": "/screenshots/autofill3rdpage1.png",
            "createTime": "2024-12-24T01:17:34.463Z"
        },
        {
            "name": "blogtitle.png",
            "fullPath": "/screenshots/blogtitle.png",
            "createTime": "2024-12-24T01:32:06.442Z"
        },
        {
            "name": "myscreenshot_70.png",
            "fullPath": "/screenshots/myscreenshot_70.png",
            "createTime": "2024-12-25T02:04:10.096Z"
        },
        {
            "name": "pagetitle.png",
            "fullPath": "/screenshots/pagetitle.png",
            "createTime": "2024-12-25T02:04:10.433Z"
        },
        {
            "name": "rpablog.png",
            "fullPath": "/screenshots/rpablog.png",
            "createTime": "2024-12-24T01:31:16.583Z"
        }
    ],
    "csvs": [
        {
            "name": "currencyconverterdata.csv",
            "size": 164,
            "fullPath": "/spreadsheets/currencyconverterdata.csv",
            "createTime": "2024-12-25T02:10:37.419Z"
        },
        {
            "name": "data_from_array.csv",
            "size": 76,
            "fullPath": "/spreadsheets/data_from_array.csv",
            "createTime": "2024-12-24T01:21:29.487Z"
        },
        {
            "name": "readcsvtestdata.csv",
            "size": 123,
            "fullPath": "/spreadsheets/readcsvtestdata.csv",
            "createTime": "2024-12-23T01:59:12.594Z"
        }
    ],
    "visions": [
        {
            "name": "canvas_3dots_verify_dpi_96.png",
            "fullPath": "/visions/canvas_3dots_verify_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_hydepark_dpi_96.png",
            "fullPath": "/visions/canvas_hydepark_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_hydepark_extract_dpi_96_relative.png",
            "fullPath": "/visions/canvas_hydepark_extract_dpi_96_relative.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_hydepark_verify_dpi_96.png",
            "fullPath": "/visions/canvas_hydepark_verify_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_wyoming_dpi_96.png",
            "fullPath": "/visions/canvas_wyoming_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "canvas_wyoming_verify_dpi_96.png",
            "fullPath": "/visions/canvas_wyoming_verify_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "democv_checkoverlay.png",
            "fullPath": "/visions/democv_checkoverlay.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "democv_ocrdone.png",
            "fullPath": "/visions/democv_ocrdone.png",
            "createTime": "2024-12-23T01:59:12.594Z"
        },
        {
            "name": "democv_share.png",
            "fullPath": "/visions/democv_share.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "democv_startocr.png",
            "fullPath": "/visions/democv_startocr.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_area_bottomright_dpi_96.png",
            "fullPath": "/visions/desktop_area_bottomright_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_area_topleft3_dpi_96.png",
            "fullPath": "/visions/desktop_area_topleft3_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_check_v_tab_dpi_96.png",
            "fullPath": "/visions/desktop_check_v_tab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_clearbutton_dpi_96.png",
            "fullPath": "/visions/desktop_clearbutton_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_logstab_grey_dpi_96.png",
            "fullPath": "/visions/desktop_logstab_grey_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_logstab_white_dpi_96.png",
            "fullPath": "/visions/desktop_logstab_white_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_scrtab_dpi_96.png",
            "fullPath": "/visions/desktop_scrtab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_searcharea_dpi_96_relative.png",
            "fullPath": "/visions/desktop_searcharea_dpi_96_relative.png",
            "createTime": "2024-12-23T01:59:12.595Z"
        },
        {
            "name": "desktop_vartab_dpi_96.png",
            "fullPath": "/visions/desktop_vartab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "desktop_vitab_dpi_96.png",
            "fullPath": "/visions/desktop_vitab_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_canvas_dpi_96.png",
            "fullPath": "/visions/draw_canvas_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_checkresult1_dpi_96.png",
            "fullPath": "/visions/draw_checkresult1_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_pencil_dpi_96.png",
            "fullPath": "/visions/draw_pencil_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_plus_dpi_96.png",
            "fullPath": "/visions/draw_plus_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_redbutton_dpi_96.png",
            "fullPath": "/visions/draw_redbutton_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_startingpoint_dpi_96.png",
            "fullPath": "/visions/draw_startingpoint_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "draw_text1_dpi_96.png",
            "fullPath": "/visions/draw_text1_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "emsjzy_dpi_144.png",
            "fullPath": "/visions/emsjzy_dpi_144.png",
            "createTime": "2024-12-25T03:32:33.637Z"
        },
        {
            "name": "getquotenumber_dpi_96_relative.png",
            "fullPath": "/visions/getquotenumber_dpi_96_relative.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "lv9ybu_dpi_144.png",
            "fullPath": "/visions/lv9ybu_dpi_144.png",
            "createTime": "2024-12-25T03:30:14.614Z"
        },
        {
            "name": "mnuyhp_dpi_144.png",
            "fullPath": "/visions/mnuyhp_dpi_144.png",
            "createTime": "2024-12-24T02:27:23.570Z"
        },
        {
            "name": "pdftest_salesquote.png",
            "fullPath": "/visions/pdftest_salesquote.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "sgtv1f_dpi_144.png",
            "fullPath": "/visions/sgtv1f_dpi_144.png",
            "createTime": "2024-12-25T02:48:50.705Z"
        },
        {
            "name": "slider_handle_dpi_96.png",
            "fullPath": "/visions/slider_handle_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "slider_red_dpi_96.png",
            "fullPath": "/visions/slider_red_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.596Z"
        },
        {
            "name": "uitest_download_dpi_96.png",
            "fullPath": "/visions/uitest_download_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_hamburger_dpi_96.png",
            "fullPath": "/visions/uitest_hamburger_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_logo_mobile_dpi_96.png",
            "fullPath": "/visions/uitest_logo_mobile_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_logo_wide_dpi_96.png",
            "fullPath": "/visions/uitest_logo_wide_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "uitest_share_dpi_96.png",
            "fullPath": "/visions/uitest_share_dpi_96.png",
            "createTime": "2024-12-23T01:59:12.597Z"
        },
        {
            "name": "youtube_play_button.png",
            "fullPath": "/visions/youtube_play_button.png",
            "createTime": "2024-12-23T01:59:12.601Z"
        },
        {
            "name": "youtube_video_content_verify.png",
            "fullPath": "/visions/youtube_video_content_verify.png",
            "createTime": "2024-12-23T01:59:12.602Z"
        }
    ],
    "config": {
        "showSidePanel": false,
        "useDarkTheme": false,
        "sidePanelOnLeft": false,
        "anthropicAPIKey": "261a1412798a37a8d33af6da6cc26da3:bGl3ZWlzdW1Ab3V0bG9vay5jb20=",
        "aiComputerUseMaxLoops": 20,
        "useInitialPromptInAiChat": true,
        "aiChatSidebarPrompt": "Describe what you see, in 10 words or less.",
        "showSettingsOnStart": false,
        "showSidebar": false,
        "showBottomArea": true,
        "playScrollElementsIntoView": true,
        "playHighlightElements": true,
        "playCommandInterval": 0.3,
        "saveAlternativeLocators": true,
        "recordNotification": true,
        "recordClickType": "click",
        "showTestCaseTab": false,
        "logFilter": "All",
        "onErrorInLoop": "continue_next_loop",
        "allowRunFromBookmark": true,
        "allowRunFromFileSchema": true,
        "allowRunFromHttpSchema": true,
        "timeoutPageLoad": 60,
        "timeoutElement": 10,
        "timeoutMacro": 0,
        "timeoutDownload": 60,
        "lastBackupActionTime": 1747979569779,
        "enableAutoBackup": true,
        "autoBackupInterval": 7,
        "autoBackupTestCases": true,
        "autoBackupTestSuites": true,
        "autoBackupScreenshots": true,
        "autoBackupCSVFiles": true,
        "autoBackupVisionImages": true,
        "shouldEncryptPassword": "master_password",
        "masterPassword": "",
        "showCommonInternalVariables": true,
        "showAdvancedInternalVariables": false,
        "storageMode": "browser",
        "xmodulesStatus": "unregistered",
        "ocrCalibration": 6,
        "ocrCalibration_internal": 6,
        "ocrScaling": 100,
        "ocrEngine": 98,
        "ocrMode": "enabled",
        "ocrLanguage": "eng",
        "ocrLanguageOption": [
            {
                "text": "Arabic",
                "value": "ara"
            },
            {
                "text": "ChineseSimplified",
                "value": "chs"
            },
            {
                "text": "ChineseTraditional",
                "value": "cht"
            },
            {
                "text": "Czech",
                "value": "ce"
            },
            {
                "text": "Danish",
                "value": "dan"
            },
            {
                "text": "Dutch",
                "value": "dut"
            },
            {
                "text": "English",
                "value": "eng"
            },
            {
                "text": "Finnish",
                "value": "fin"
            },
            {
                "text": "French",
                "value": "fre"
            },
            {
                "text": "German",
                "value": "ger"
            },
            {
                "text": "Greek",
                "value": "gre"
            },
            {
                "text": "Hungarian",
                "value": "hun"
            },
            {
                "text": "Italian",
                "value": "ita"
            },
            {
                "text": "Japanese",
                "value": "jpn"
            },
            {
                "text": "Korean",
                "value": "kor"
            },
            {
                "text": "Norwegian",
                "value": "nor"
            },
            {
                "text": "Polish",
                "value": "pol"
            },
            {
                "text": "Portuguese",
                "value": "por"
            },
            {
                "text": "Russian",
                "value": "rus"
            },
            {
                "text": "Spanish",
                "value": "spa"
            },
            {
                "text": "Swedish",
                "value": "swe"
            },
            {
                "text": "Turkish",
                "value": "tur"
            }
        ],
        "ocrOfflineURL": "",
        "ocrOfflineAPIKey": "",
        "cvScope": "browser",
        "defaultVisionSearchConfidence": 0.6,
        "useDesktopScreenCapture": true,
        "waitBeforeDesktopScreenCapture": false,
        "secondsBeforeDesktopScreenCapture": 3,
        "defaultProxy": "",
        "defaultProxyAuth": "",
        "turnOffProxyAfterReplay": true,
        "disableOpenSidepanelBtnTemporarily": false,
        "oneTimeShowSidePanel": null,
        "size": {
            "standard": {
                "height": 912,
                "width": 1707
            }
        },
        "websiteWhiteList": [
            "http://127.0.0.1:5500/ui.vision.html"
        ]
    },
    "proxy": null,
    "ui": {
        "focusArea": "unknown",
        "isSaving": false
    },
    "macroQuery": ""
}

// 初始化 store 的 action
const initAction: (set: any, get: any) => Action = (set, get) => ({
    increment: () => set((state: State) => ({ count: state.count + 1 })), // 增加计数
    startRecording: () => set((state: State) => ({
        status: APP_STATUS.RECORDING,
        recorderStatus: RECORDER_STATUS.RECORDING,
        player: {
            ...state.player,
            nextCommandIndex: null
        }
    })), // 开始录制
    stopRecording: () => set((state: State) => ({
        status: APP_STATUS.NORMAL,
        recorderStatus: RECORDER_STATUS.STOPPED,
    })), // 停止录制
    startInspecting: () => set((state: State) => ({
        status: APP_STATUS.INSPECTOR,
        inspectorStatus: INSPECTOR_STATUS.PENDING,
    })), // 开始检查
    stopInspecting: () => set((state: State) => ({
        status: APP_STATUS.NORMAL,
        inspectorStatus: INSPECTOR_STATUS.STOPPED,
    })), // 停止检查
    doneInspecting: () => set((state: State) => ({
        status: APP_STATUS.NORMAL,
        inspectorStatus: INSPECTOR_STATUS.STOPPED,
    })), // 检查完成
    startPlaying: async () => {
        const state = get();
        console.log(state.increment, 'state');
        const res = await ipc.invoke('start-playing', {
            status: APP_STATUS.PLAYER
        })
        console.log('res', res)
        set({
            status: APP_STATUS.PLAYER
        })
    }, // 开始播放
    stopPlaying: () => set((state: State) => ({
        status: APP_STATUS.NORMAL,
    })), // 停止播放
    appendCommand: (command: Command) => set((state: State) => ({
        editor: {
            ...state.editor,
            editing: {
                ...state.editor.editing,
                commands: [...state.editor.editing.commands, command]
            }
        }
    })), // 添加命令
    deplicateCommand: (index: number) => set((state: State) => {
        const commands = state.editor.editing.commands;
        const newCommands = commands.slice()
        newCommands.splice(index + 1, 0, commands[index])
        return {
            editor: {
                ...state.editor,
                editing: {
                    ...state.editor.editing,
                    meta: {
                        ...state.editor.editing.meta,
                        selectedIndex: index + 1
                    },
                    commands: newCommands
                }
            }
        }
    }),

    insertCommand: () => set(() => { }), // 

    updateCommand: (index: number, command: Command) => set((state: State) => ({
        editor: {
            ...state.editor,
            editing: {
                ...state.editor.editing,
                commands: state.editor.editing.commands.map((c, i) => i === index ? command : c)
            }
        }
    })), // 更新命令

    // 复制命令
    removeCommand: (index: number) => set((state: State) => ({
        editor: {
            ...state.editor,
            editing: {
                ...state.editor.editing,
                commands: state.editor.editing.commands.filter((_, i) => i !== index)
            }
        }
    })), // 删除命令

    selectCommand: () => { },

    updateEditing: () => { },

    cutCommand: () => { },

    copyCommand: () => { },

    pasteCommand: () => { },


    moveCommand: () => { },

    normalizeCommands: () => { },

    updateSelectedCommand: () => { },

    saveEditingAsExisted: () => { },

    saveEditingAsNew: () => { },

    setTestCases: () => { },

    setTestSuites: () => { },

    updateTestSuites: () => { },

    updateTestSuiteStatus: () => { },

    setEditing: () => { },

    editTestCase: () => { },

    setOneMacroExtra: () => { },

    updateOneMacroExtra: () => { },

    renameTestCase: () => { },

    removeTestCase: () => { },

    editNewTestCase: () => { },

    setMacrosExtra: () => { },

    setTestSuitesExtra: () => { },

    setMacroFolderStructure: () => { },

    setTestSuiteFolderStructure: () => { },

    setPlayerState: () => { },

    addLogs: () => { },

    clearLogs: () => { },

    addScreenshot: () => { },

    clearScreenshots: () => { },

    updateConfig: () => { },

    setCSVList: () => { },

    setScreenshotList: () => { },

    setVisionList: () => { },

    setVariableList: () => { },

    updateUI: () => { },


    setEditorActiveTab: (tab: 'table_view' | 'source_view') => set((state: State) => ({
        editor: {
            ...state.editor,
            activeTab: tab
        }
    })), // 设置活动标签

    setSourceError: () => { },

    setSourceCurrent: () => { },

    updateProxy: () => { },

    setIsDraggingCommand: (isDragging: boolean) => set((state: State) => ({
        editor: {
            ...state.editor,
            isDraggingCommand: isDragging
        }
    })), // 设置拖拽命令

    setCurrentMacro: (macro: Macro | null) => set((state: State) => ({
        editor: {
            ...state.editor,
            currentMacro: macro || null
        }
    })), // 设置当前宏
    setIsLoadingMacros: () => { },

    setFrom: () => { },

    setNoDisplayInPlay: () => { },

    setOcrInDesktopMode: () => { },

    setReplaySpeedOverrideToFastMode: () => { },

    setMacroQuery: () => { },

    setIndexToInsertRecorded: () => { },

    toggleRecorderSkipOpen: () => { },
})

// 创建 store
const useStore = create<State & Action>((set, get) => ({
    ...initialState,
    ...initAction(set, get)
}))

// 监听状态
useStore.subscribe((state) => {
    // 如果继续
})

export default useStore

// 数据单一来源原则
// 变量
// store中的状态
// 